#ifndef __RELOCALISER_VIEWER_H
#define __RELOCALISER_VIEWER_H

#include "Relocaliser.h"
#include <TooN/TooN.h>
using namespace TooN;
#include <TooN/se3.h>
#include <sstream>
#include "GLWindow2.h"

class Map;

class RelocaliserViewer
{
public:
  RelocaliserViewer(Relocaliser &relocaliser, GLWindow2 &glw);
  void DrawMap();
  std::string GetMessageForUser();
  
protected:
  Relocaliser &mRelocaliser;
  GLWindow2 &mGLWindow;
  
  void DrawGrid();
  void DrawMapDots();
  void SetupFrustum();
  void SetupModelView(SE3<> se3WorldFromCurrent = SE3<>());
  void DrawCamera(SE3<> se3, bool bSmall=false);
  
  Vector<3> mv3MassCenter;
  SE3<> mse3ViewerFromWorld;

  std::ostringstream mMessageForUser;
};

#endif
